{% extends "app/layout.html" %}

{% block title %} 项目列表 {% endblock %}

{% block page_nav %}
{% endblock %}

{% block page_title %}
{% endblock %}

{% block page_body %}
<div style="padding: 30px;">
  <form action="{% url 'profile' %}" method="POST" class="form-horizontal">
    {% csrf_token %}
    <div class="form-group">
      <label class="col-md-3 control-label">用户名: </label>

      <div class="col-md-9">
        <label type="text" class="form-control">{{ username }}</label>
        <a href="{% url 'reset_pw' user_id=request.user.id %}" class="btn btn-sm btn-warning">
          重置密码
        </a>
      </div>
    </div>
    <div class="form-group">
      <label class="col-md-3 control-label">Email: </label>

      <div class="col-md-9">
        <label type="text" class="form-control">{{ email }}</label>
      </div>
    </div>

    <div class="form-group">
      <label class="col-md-3 control-label">APP ID: </label>

      <div class="col-md-9">
        <label class="form-control">{{ app_id }}</label>
      </div>
    </div>

    <div class="form-group">
      <label class="col-md-3 control-label">APP Key: </label>

      <div class="col-md-9">
        <label class="form-control">{{ app_key }}</label>
      </div>
    </div>

    <div class="form-group">
      <label class="col-md-3 control-label">APP Secret: </label>

      <div class="col-md-9">
        <label class="form-control">{{ secret }}</label>
      </div>
    </div>

    <input name="action" value="RENEW" type="hidden"/>

    <div class="form-group">
      <label class="col-md-3 control-label"></label>

      <div class="col-md-9">
        <button type="submit" class="btn btn-sm btn-success">重新生成 Secret</button>
      </div>
    </div>
  </form>
</div>
{% endblock %}

{% block js %}
<script>
  $('#user').addClass('active');
  $('#profile').addClass('active');
  $(document).ready(function () {
    App.init();
  });
</script>
{% endblock %}
